package main

import "fmt"

func main() {
	sum := 0
	for i := 0; i < 10; i++ {
		sum += i
	}
	println(sum)

	i := 10
	for i < 20 {
		sum += i
		i++
	}
	println(sum)

	for i < 30 {
		sum += i
		i++
	}
	println(sum)

	for {
		sum += i
		i++
		if i >= 40 {
			break
		}
	}
	println(sum)

	strings := []string{"google", "runoob"}
	for i, s := range strings {
		fmt.Println(i, s)
	}

	numbers := [6]int{1, 2, 3, 5}
	for i, x := range numbers {
		fmt.Printf("第 %d 位 x 的值 = %d\n", i, x)
	}
}
